#include "panel.h"

panel::panel(QWidget *parent)
    : QWidget(parent)
{
     startBtn=new QPushButton(tr("start"));
     stopBtn=new QPushButton(tr("stop"));
     closeBtn=new QPushButton(tr("close"));
     btnLayout=new QHBoxLayout();
    /* pathLabel=new QLabel;
     scanLabel=new QLabel;
     pathImage->load("path.png");
     pathLabel->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
     pathLabel->setPixmap(QPixmap::fromImage(*pathImage));
     scanImage->load("scan.png");
     scanLabel->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter);
     scanLabel->setPixmap((QPixmap::fromImage(*scanImage)));
    */

     pathTextEdit=new QTextEdit;
     scanTextEdit=new QTextEdit;
     pathLayout=new QHBoxLayout();
     pathLayout->addWidget(pathTextEdit);

     scanLayout=new QHBoxLayout();
     scanLayout->addWidget(scanTextEdit);

     btnLayout->addWidget(startBtn);
     btnLayout->addWidget(stopBtn);

     btnLayout->addWidget(closeBtn);
     connect(startBtn,SIGNAL(clicked()),this,SLOT(StartSlot()));
     connect(closeBtn,SIGNAL(clicked()),this,SLOT(quit()));
     connect(stopBtn,SIGNAL(clicked()),this,SLOT(StopSlot()));

     mainLayout=new QGridLayout(this);
     mainLayout->setMargin(15);
     mainLayout->setSpacing(10);
     mainLayout->addLayout(pathLayout,0,0);
     mainLayout->addLayout(scanLayout,0,1);
     mainLayout->addLayout(btnLayout,1,0,1,2);
     mainLayout->setRowStretch(0,1);
     mainLayout->setColumnStretch(0,1);
}
void panel::StartSlot()
{

}

void panel::StopSlot()
{

}

panel::~panel()
{

}
